package Controller;

import Model.Book;
import View.BookView;

public class BookController {
    private BookView view;
    private Book model;
    public BookController(Book model, BookView view) {
        this.model = model;
        this.view = view;
    }

    public void setBookTitle(String title){
        model.setTitle(title);
    }

    public void setBookAuthor(String author){
        model.setAuthor(author);
    }

    public void setStock(int stock){
        model.setStock(stock);
    }

    public void updateView(){
        view.printBookDetails(model.getTitle(), model.getAuthor(), model.getStock());
    }
}
